var cardparam = {};
cardparam.savetype = CardOption["add"];	
var cardWindow;
Ext.onReady(function(){
	Ext.form.Field.prototype.msgTarget = 'side';//统一指定错误信息提示方式
	var hd = new Ext.Panel({
	       border: false,
	       layout:'anchor',
	       region:'north',
	       bodyStyle:'borderWidth:0px 0px 1px 0px;',
	       height:40,
	       html:'<div style="background: #fff url(resource/images/icons/card/card_header.png) no-repeat right top" align=center>' +
				'<span style="font-family:微软雅黑;font-size:18px;font-weight:bold;font-style:normal;color:#005CEC;">' +
					pageparam.title + 
				'</span><br><img src = "resource/images/icons/card/empty_editor_divider.png">' +
			'</div>'
	   });
	
	var formListTemplate = new Ext.publics.CardFormPanel({},{FORMS:pageparam.form})
	  
	cardWindow = new Ext.Window( {
			layout : 'border',
			width : cardparam.width ? cardparam.width : 700,
			height : cardparam.height ? cardparam.height : 500,
			resizable : typeof(cardparam.resizable) == "undefined" ? true : cardparam.resizable,
			draggable : typeof(cardparam.draggable) == "undefined" ? true : cardparam.draggable,
			closable : typeof(cardparam.closable) == "undefined" ? true : cardparam.closable,
			id:CardWindowId,
			modal : typeof(cardparam.modal) == "undefined" ? true : cardparam.modal,
			closeAction : 'hide',
			title : '<span class="commoncss">' + (typeof(cardparam.title) == "undefined" ? pageparam.title : cardparam.title) + '</span>',
			iconCls : typeof(cardparam.iconCls) == "undefined" ? "" : cardparam.iconCls,
			collapsible : true,
			titleCollapse : true,
			maximizable : typeof(cardparam.maximizable) == "undefined" ? true : cardparam.maximizable,
			buttonAlign : 'right',
			border : true,
			animCollapse : true,
			constrain : true,
			items : [ hd,formListTemplate ]
		});
});
